import { INCREMENT, DECREMENT } from '../const.js'

const increment = data => ({ type: INCREMENT, data })
const decrement = data => ({ type: DECREMENT, data })
const asyncincrement = (data, time = 1000) => {
    return (dispatch) => {
        setTimeout(() => {
            dispatch(increment(data))
        }, time)
    }
}

export { increment, decrement, asyncincrement }